

from base.base import Base
from selenium.webdriver.common.by import By
from time import sleep

class ThirdDelehtePage(Base):

    goodsmanager = (By.XPATH, '//span[text()="商场管理"]')
    def clickgoodsmanager(self):
        self.loc_ele(self.goodsmanager).click()

    keys = (By.XPATH, '//span[text()="关键词"]')
    def clickkeys(self):
        self.loc_ele(self.keys).click()

    delete = (By.XPATH,"/html/body/div[1]/div/div[2]/section/div/div[2]/div[3]/table/tbody/tr[1]/td[6]/div/button[2]")
    def clickdelete(self):
        self.loc_ele(self.delete).click()


    dy = (By.CSS_SELECTOR, 'body > div.el-notification.right > div > div.el-notification__content > p')
    def getdycontent(self):
        return self.loc_ele(self.dy).text

    # 操作业务的方法
    def thirddelete(self):
        self.clickgoodsmanager()
        sleep(3)
        self.clickkeys()
        sleep(1)
        self.clickdelete()
        sleep(3)
